As an image processing technique, there has been conventionally known a technique for recognizing characters in image data. In this technique, character recognition is performed with respect to image data of a document image scanned by an image reading apparatus for example.
In a case of character recognition, if image data is rotated by 90 degrees or 180 degrees from a normal state, it is impossible to recognize characters correctly. Therefore, it is necessary to determine an orientation of image data so as to recognize characters based on the orientation indicated by the result of the determination.
On the other hand, some image data includes a plurality of regions with different formats, such as a table or a graph including characters. It is difficult to determine an orientation of such image data. In order to deal with this problem, Patent Literature 1 for example discloses segmentation of a character region in a document image into a plurality of portions such as a text region, a title region, a character-in-table region, and a caption-drawing region. Then, the orientation of the document image is determined by one of the following methods, and thereafter character recognition is performed with respect to whole character regions.
(1) A text region, a title region, a character-in-table region, and a caption-drawing region are given priorities, the orientation of a document is determined based on a region given a higher priority, and the result of the determination is regarded as the orientation of the document.(2) The orientation of a character region is determined using the result of determination with high degree of confidence, and if the same result of determination is obtained among a plurality of character regions, the orientation indicated by the result of determination is regarded as the orientation of a document.(3) The orientations of all character regions are determined, and the orientation indicated by many number of the results of determination is regarded as the orientation of a document.
Further, Patent Literature 2 describes a technique in which image data is divided into a plurality of regions, and the degree of reliability of each divided region when it is used for determining an orientation of a whole document is obtained, and then character data is cut out from a region with the highest degree of reliability, and the orientation of image data is determined based on the region with the highest degree of reliability.